import type { ProColumnsTypes } from '@vh-admin/pro-components/lib/t-table-custom/types';
export const columnsFn = (): ProColumnsTypes<any>[] => {
  return [
    { title: '请求接口', dataIndex: 'route_zh_name' },
    { title: '请求环境', dataIndex: 'source' },
    {
      title: '请求结果',
      dataIndex: 'type',
      valueType: 'select',
      fieldProps: {
        options: [
          { value: null, label: '全部' },
          { value: 1, label: '成功' },
          { value: 2, label: '失败' },
        ],
      },
    },
    { title: 'IP地址', dataIndex: 'ip' },
    {
      title: '请求时间',
      dataIndex: 'created_at',
      valueType: 'dateRange',
      sorter: true,
      hideInTable: true,
      hideInForm: true,
    },
    {
      title: '请求时间',
      dataIndex: 'created_at',
      search: false,
      sorter: true,
    },
    { title: '操作人', dataIndex: 'user_name', valueType: 'select', search: false },
  ];
};
